#include <stdio.h>
int main()
{
	int letter=0,space=0,digit=0,other=0;
	char ch;
    do{
        scanf("%c",&ch);
        if ((ch>='a'&& ch<='z') || (ch>='A'&& ch<='Z'))
         {letter++;
         }
        else if(ch >='0' && ch<='9')
        {digit++;
        }
        else if (ch==' ')
        {space++;
        }
        else 
        {other++;
        }
    }while (ch!='#');
	printf("字母有%d个，空格有%d个，数字有%d个，其他字符有%d个\n",letter,space,digit,other);  
	return 0;
}
